/*
语法百题 解题报告：
 http://git.oschina.net/et0662/sznoi-grammar/ 
*/
#include<stdio.h>

int main(void)
{
	char t;
	int n=0;
	while( 1 )
	{
		t=getchar();
		if((t=='e') || (t=='o'))
		{
			if(t=='e')
			{
				if(n%2==0)
					printf("0");
				else
					printf("1");
			}
			else
			{
				if(n%2==1)
					printf("0");
				else
					printf("1");
			}
			break;
		}
		else if(t=='#')
		{
			break;
		}
		else
		{
			printf("%c",t);
			if(t=='1')
				n++;
		}
	}
	return 0;
}
